
package com.companymodule.bean;

import com.companymodule.dao.TbCompanyDAO;
import com.productmodule.bean.TbProductType;
import com.productmodule.dao.TbProductTypeDAO;

public class TbCompanyProductTypeMiddle implements java.io.Serializable {

    private int companyProductTypeMiddleId;

    private int companyId;
    private TbCompany tbCompany;
    private int productTypeId;
    private TbProductType tbProductType;
    private String createTime;

    public int getCompanyProductTypeMiddleId(){
        return companyProductTypeMiddleId;
    }

    public void setCompanyProductTypeMiddleId(int companyProductTypeMiddleId){
        this.companyProductTypeMiddleId = companyProductTypeMiddleId;
    }

    public int getCompanyId(){
        return companyId;
    }

    public void setCompanyId(int companyId){
        this.companyId = companyId;
        this.tbCompany=new TbCompanyDAO().getTbCompanyByCompanyId(companyId);
    }

    public int getProductTypeId(){
        return productTypeId;
    }

    public void setProductTypeId(int productTypeId){
        this.productTypeId = productTypeId;
        this.tbProductType=new TbProductTypeDAO().getTbProductTypeByProductTypeId(productTypeId);
    }

    public String getCreateTime(){
        return createTime;
    }

    public void setCreateTime(String createTime){
        this.createTime = createTime;
    }
    
    public TbCompany getTbCompany() {
		return tbCompany;
	}

	public void setTbCompany(TbCompany tbCompany) {
		this.tbCompany = tbCompany;
	}

	public TbProductType getTbProductType() {
		return tbProductType;
	}

	public void setTbProductType(TbProductType tbProductType) {
		this.tbProductType = tbProductType;
	}

	public TbCompanyProductTypeMiddle(){
    }
    public TbCompanyProductTypeMiddle(int companyId,int productTypeId){
        this.companyId = companyId;
        this.productTypeId = productTypeId;
    }
    public TbCompanyProductTypeMiddle(int companyProductTypeMiddleId,int companyId,int productTypeId){
        this.companyProductTypeMiddleId = companyProductTypeMiddleId;
        this.companyId = companyId;
        this.productTypeId = productTypeId;
    }
}

